<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:c="http://java.sun.com/jstl/core"
    template="layout/template.xhtml">
	<ui:define name="body">
	
<!-- 	    <h:form id="crmaeConsulta" styleClass="edit"> -->
	    <h:form id="form1">
	    	<a4j:commandLink  action="#{amusrListaBean.consultarAllUsers}" value="#{resourceApp.login_ingresar}" type="submit" reRender="form1"
					style="FONT-WEIGHT: bold; width : 107px; height : 20px;">
	    	</a4j:commandLink>
			<c:if test="${empty amusrListaBean.amusrLista}">
				<rich:panel>
					<div align="center">
						<h:graphicImage value="/img/info.gif" />
						<h:outputLabel value="#{resourceApp.amusr_sin_info}" />
					</div>
				</rich:panel>
			</c:if>
			<c:if test="${!empty amusrListaBean.amusrLista}">
				<rich:panel>
					<f:facet name="header">
						<h:outputText value="#{resourceApp.amusr_titulo_lista}"></h:outputText>
					</f:facet>
					<rich:spacer></rich:spacer>
					<rich:dataTable value="#{amusrListaBean.amusrLista}" id="idTablaUsuarios" rows="20" rowClasses="filas"
					headerClass="headerText" style=" width : 100%;"
					var="listaResultadoTabla" onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
					onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" border="1">
					<rich:column sortBy="#{listaResultadoTabla.auslog}"
						headerClass="encabezadoCol" filterBy="#{listaResultadoTabla.auslog}" filterEvent="onkeyup">
						<f:facet name="header">
							<h:outputText value="#{resourceApp.amusr_auslog}" />
						</f:facet>
						<h:outputText value="#{listaResultadoTabla.auslog}"/>
					</rich:column>
					<rich:column sortBy="#{listaResultadoTabla.ausnom}"
						headerClass="encabezadoCol" filterBy="#{listaResultadoTabla.ausnom}" filterEvent="onkeyup">
						<f:facet name="header">
							<h:outputText value="#{resourceApp.amusr_ausnom}" />
						</f:facet>
						<h:outputText value="#{listaResultadoTabla.ausnom}" />
					</rich:column>
					<rich:column sortBy="#{listaResultadoTabla.aushdu}"
						headerClass="encabezadoCol">
						<f:facet name="header">
							<h:outputText value="#{resourceApp.amusr_aushdu}" />
						</f:facet>
						<h:outputText value="#{listaResultadoTabla.aushdu}" />
					</rich:column>
					<rich:column sortBy="#{listaResultadoTabla.ausesp}"
						headerClass="encabezadoCol">
						<f:facet name="header">
							<h:outputText value="#{resourceApp.amusr_ausesp}" />
						</f:facet>
						<h:outputText value="#{listaResultadoTabla.ausesp}" />
					</rich:column>
					<rich:column sortBy="#{listaResultadoTabla.aprnom}"
						headerClass="encabezadoCol">
						<f:facet name="header">
							<h:outputText value="#{resourceApp.aprnom}" />
						</f:facet>
						<h:outputText value="#{listaResultadoTabla.aprnom}" />
					</rich:column>
					<rich:column headerClass="encabezadoCol"> 
						<f:facet name="header">
							<h:outputText value="#{resourceApp.lbl_accion}" />
						</f:facet>
						<h:panelGrid columns="4">
							<a4j:commandLink action="#{amusrListaBean.visualizar}">
								<f:param name="id_usurio" value="#{listaResultadoTabla.auside}" />
								<h:graphicImage value="/imagenes/icons/masInfo.gif" title="editar"/>
							</a4j:commandLink>
							<a4j:commandLink action="#{amusrListaBean.masInformacion}">
								<f:param name="id_usuario" value="#{listaResultadoTabla.auside}" />
								<h:graphicImage value="/imagenes/icons/verListado.gif" title="visualizar"/>
							</a4j:commandLink>
						</h:panelGrid>
					</rich:column>	
					</rich:dataTable>
					<rich:spacer height="30" />
					<rich:datascroller align="center"  for="idTablaUsuarios" maxPages="20" />
					
					
					<div class="dialog">
						<a4j:commandButton id="crearAmusr"
							action="#{amusrBean.amusrIniciar}"
							value="#{resourceApp.amusr_crear}" type="submit" reRender="loginForm"
							style="FONT-WEIGHT: bold; width : 107px; height : 20px;">
						</a4j:commandButton>
	       			</div>
				</rich:panel>
			</c:if>
		</h:form>
	</ui:define>
</ui:composition>